;;; GNU Guix --- Functional package management for GNU
;;;
;;; Copyright © 2022 jgart <jgart@dismail.de>
;;; Copyright © 2022 (unmatched parenthesis <paren@disroot.org>
;;;
;;; This file is not part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (guixrus packages the-way)
  #:use-module (gnu packages)
  #:use-module (gnu packages check)
  #:use-module (gnu packages crates-io)
  #:use-module (gnu packages crates-graphics)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages tls)
  #:use-module ((guixrus packages common rust) #:prefix rus:)
  #:use-module (guix build-system cargo)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix utils))

(define-public the-way
  (package
    (name "the-way")
    (version "0.15.0")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "the-way" version))
        (file-name (string-append name "-" version ".tar.gz"))
        (sha256
          (base32 "0lrh2xvivkai9lkpp12jli7x1gfvz3ql33za3837a9xhk1qyqmpz"))))
    (build-system cargo-build-system)
    (arguments
     (list #:cargo-inputs
           `(("rust-bincode" ,rust-bincode-1)
             ("rust-chrono" ,rust-chrono-0.4)
             ("rust-chrono-english" ,rus:rust-chrono-english-0.1)
             ("rust-color-eyre" ,rus:rust-color-eyre-0.5)
             ("rust-confy" ,rus:rust-confy-0.4)
             ("rust-dialoguer" ,rus:rust-dialoguer-0.9)
             ("rust-directories-next" ,rus:rust-directories-next-1)
             ("rust-eyre" ,rust-eyre-0.6)
             ("rust-hex" ,rust-hex-0.4)
             ("rust-indicatif" ,rus:rust-indicatif-0.16)
             ("rust-regex" ,rust-regex-1)
             ("rust-serde" ,rust-serde-1)
             ("rust-serde-derive" ,rust-serde-derive-1)
             ("rust-serde-json" ,rust-serde-json-1)
             ("rust-serde-yaml" ,rus:rust-serde-yaml-0.8)
             ("rust-skim" ,rus:rust-skim-0.9)
             ("rust-sled" ,rus:rust-sled-0.34)
             ("rust-structopt" ,rus:rust-structopt-0.3)
             ("rust-syntect" ,rust-syntect-4)
             ("rust-thiserror" ,rus:rust-thiserror-1)
             ("rust-ureq" ,rust-ureq-2))
           #:cargo-development-inputs
           `(("rust-assert-cmd" ,rust-assert-cmd-2)
             ("rust-clipboard" ,rus:rust-clipboard-0.5)
             ("rust-predicates" ,rust-predicates-2)
             ("rust-rexpect" ,rus:rust-rexpect-0.4)
             ("rust-tempfile" ,rust-tempfile-3))))
    (home-page "https://github.com/out-of-cheese-error/the-way")
    (synopsis "Code snippets for your terminal")
    (description
     "This package provides a code snippets manager for the terminal.")
    (license license:expat)))
